<script setup lang="ts">
import { ref } from "vue";
import { mainStore } from "../store";
import { storeToRefs } from "pinia";

defineProps<{ msg: string }>();

const store = mainStore();
const { ip } = storeToRefs(store);

const count = ref(0);
</script>

<template>
  <h1>{{ msg }}</h1>
  <h2>{{ ip }}</h2>
  <el-button type="button" @click="count++">count is: {{ count }}</el-button>
</template>

<style scoped>
a {
  color: #42b983;
}

label {
  margin: 0 0.5em;
  font-weight: bold;
}

code {
  background-color: #eee;
  padding: 2px 4px;
  border-radius: 4px;
  color: #304455;
}
</style>
